﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ExpertMIS.Entities;

namespace ExpertMIS.UserControl
{
    public partial class ucExpertView : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        public void LoadExpert(ExpertEntity expert)
        {
            lblName.Text = expert.Name;

            lblDomains.Text = "";
            hlMail.NavigateUrl = string.Format("mailto://{0}", expert.EMail);
            hlMail.Text = expert.EMail;
            lblDescription.Text = "";

            Image1.ImageUrl = expert.Graphic;
        }

        public void SetVisible(bool visible)
        {
            if (visible)
                expert_table.Style.Remove("display");
            else
                expert_table.Style.Add("display", "none");
        }

        public override string ClientID
        {
            get
            {
                return expert_table.ClientID;
            }
        }
    }
}